<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>: {{ video_info.original_name | default('', true) }}</title>
    <style>
        body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 20px auto; padding: 0 20px; }
        h1, h2, h3 { color: #2c3e50; }
        h1 { border-bottom: 2px solid #3498db; padding-bottom: 10px; }
        h2 { border-bottom: 1px solid #eee; padding-bottom: 5px; }
        .card { background: #f8f9fa; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        .keywords span { display: inline-block; background: #e7f5ff; color: #0056b3; padding: 5px 12px; margin: 4px; border-radius: 15px; font-size: 0.9em; }
        .chapter { border-left: 4px solid #3498db; padding-left: 15px; margin-bottom: 15px; }
        .transcript { white-space: pre-wrap; background: #fafafa; padding: 15px; border: 1px solid #eee; border-radius: 5px; }
    </style>
</head>
<body>
    <h1> </h1>
    <p><strong>:</strong> {{ video_info.original_name | default('', true) }}</p>

    <div class="card">
        <h2> </h2>
        <p>{{ summary.summary | default('', true) | replace('\n', '<br>') | safe }}</p>
    </div>

    <div class="card">
        <h2> </h2>
        <div class="keywords">
            {% if summary.keywords %}
                {% for keyword in summary.keywords %}<span>{{ keyword }}</span>{% endfor %}
            {% else %}
                <p></p>
            {% endif %}
        </div>
    </div>

    <div class="card">
        <h2> </h2>
        {% if summary.chapters %}
            {% for chapter in summary.chapters %}
            <div class="chapter">
                <h3>{{ chapter.chapter }}: {{ chapter.title }}</h3>
                <p><strong>:</strong> {{ chapter.start_time | int | timestamp }} - {{ chapter.end_time | int | timestamp }}</p>
                <p>{{ chapter.content }}</p>
            </div>
            {% endfor %}
        {% else %}
            <p></p>
        {% endif %}
    </div>

    <div class="card">
        <h2> </h2>
        <div class="transcript">{{ transcript.text | default('', true) }}</div>
    </div>
</body>
</html>
